<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AngelScript: asIScriptModule Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
  $(document).ready(function() { init_search(); });
/* @license-end */
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
  <td id="projectalign">
   <div id="projectname">AngelScript
   </div>
  </td>
    <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <span id="MSearchSelect"                onmouseover="return searchBox.OnSearchSelectShow()"                onmouseout="return searchBox.OnSearchSelectHide()">&#160;</span>
          <input type="text" id="MSearchField" value="" placeholder="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.6 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('classas_i_script_module.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div class="header">
  <div class="summary">
<a href="classas_i_script_module-members.html">List of all members</a>  </div>
  <div class="headertitle"><div class="title">asIScriptModule Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span><div class="ingroups"><a class="el" href="group__api__principal__interfaces.html">Principal interfaces</a></div></div></div>
</div><!--header-->
<div class="contents">

<p>The interface to the script modules.  
 <a href="classas_i_script_module.html#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td colspan="2"><div class="groupHeader">Miscellaneous</div></td></tr>
<tr class="memitem:aa356d6cd8fa3a23842ecb624926711e3"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classas_i_script_engine.html">asIScriptEngine</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_module.html#aa356d6cd8fa3a23842ecb624926711e3">GetEngine</a> () const =0</td></tr>
<tr class="memdesc:aa356d6cd8fa3a23842ecb624926711e3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a pointer to the engine.  <br /></td></tr>
<tr class="separator:aa356d6cd8fa3a23842ecb624926711e3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1a7534bace9eefdc3175a1999f9cbf4a"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_module.html#a1a7534bace9eefdc3175a1999f9cbf4a">SetName</a> (const char *name)=0</td></tr>
<tr class="memdesc:a1a7534bace9eefdc3175a1999f9cbf4a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the name of the module.  <br /></td></tr>
<tr class="separator:a1a7534bace9eefdc3175a1999f9cbf4a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9e1bae86cb54be53f90dbd352c6d04ed"><td class="memItemLeft" align="right" valign="top">virtual const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_module.html#a9e1bae86cb54be53f90dbd352c6d04ed">GetName</a> () const =0</td></tr>
<tr class="memdesc:a9e1bae86cb54be53f90dbd352c6d04ed"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the name of the module.  <br /></td></tr>
<tr class="separator:a9e1bae86cb54be53f90dbd352c6d04ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0e6a69be59f16c8b51d1e21d3905d95c"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_module.html#a0e6a69be59f16c8b51d1e21d3905d95c">Discard</a> ()=0</td></tr>
<tr class="memdesc:a0e6a69be59f16c8b51d1e21d3905d95c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Discards the module.  <br /></td></tr>
<tr class="separator:a0e6a69be59f16c8b51d1e21d3905d95c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">Compilation</div></td></tr>
<tr class="memitem:a330835919b565c76c25e9425536f50b7"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_module.html#a330835919b565c76c25e9425536f50b7">AddScriptSection</a> (const char *name, const char *code, size_t codeLength=0, int lineOffset=0)=0</td></tr>
<tr class="memdesc:a330835919b565c76c25e9425536f50b7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a script section for the next build.  <br /></td></tr>
<tr class="separator:a330835919b565c76c25e9425536f50b7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8acf107194c5f079d7f7507309ebe613"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_module.html#a8acf107194c5f079d7f7507309ebe613">Build</a> ()=0</td></tr>
<tr class="memdesc:a8acf107194c5f079d7f7507309ebe613"><td class="mdescLeft">&#160;</td><td class="mdescRight">Build the previously added script sections.  <br /></td></tr>
<tr class="separator:a8acf107194c5f079d7f7507309ebe613"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1258d7cfeed965f36ba312beeb49e81c"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_module.html#a1258d7cfeed965f36ba312beeb49e81c">CompileFunction</a> (const char *sectionName, const char *code, int lineOffset, <a class="el" href="angelscript_8h.html#a5428f0c940201e5f3bbb28304aeb81bc">asDWORD</a> compileFlags, <a class="el" href="classas_i_script_function.html">asIScriptFunction</a> **outFunc)=0</td></tr>
<tr class="memdesc:a1258d7cfeed965f36ba312beeb49e81c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compile a single function.  <br /></td></tr>
<tr class="separator:a1258d7cfeed965f36ba312beeb49e81c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a34850e152dcdcb58c53a2b6929cebf77"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_module.html#a34850e152dcdcb58c53a2b6929cebf77">CompileGlobalVar</a> (const char *sectionName, const char *code, int lineOffset)=0</td></tr>
<tr class="memdesc:a34850e152dcdcb58c53a2b6929cebf77"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compile a single global variable and add it to the scope of the module.  <br /></td></tr>
<tr class="separator:a34850e152dcdcb58c53a2b6929cebf77"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a76733de5a86875c4a0f021f7f92a6d12"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="angelscript_8h.html#a5428f0c940201e5f3bbb28304aeb81bc">asDWORD</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_module.html#a76733de5a86875c4a0f021f7f92a6d12">SetAccessMask</a> (<a class="el" href="angelscript_8h.html#a5428f0c940201e5f3bbb28304aeb81bc">asDWORD</a> accessMask)=0</td></tr>
<tr class="memdesc:a76733de5a86875c4a0f021f7f92a6d12"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the access mask that should be used during the compilation.  <br /></td></tr>
<tr class="separator:a76733de5a86875c4a0f021f7f92a6d12"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab8629af79cee8212d0d244314d36f42a"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_module.html#ab8629af79cee8212d0d244314d36f42a">SetDefaultNamespace</a> (const char *nameSpace)=0</td></tr>
<tr class="memdesc:ab8629af79cee8212d0d244314d36f42a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the default namespace that should be used in the following calls.  <br /></td></tr>
<tr class="separator:ab8629af79cee8212d0d244314d36f42a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af9faa3ed704bbd85b75ca72fae5a68fe"><td class="memItemLeft" align="right" valign="top">virtual const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_module.html#af9faa3ed704bbd85b75ca72fae5a68fe">GetDefaultNamespace</a> () const =0</td></tr>
<tr class="memdesc:af9faa3ed704bbd85b75ca72fae5a68fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the current default namespace.  <br /></td></tr>
<tr class="separator:af9faa3ed704bbd85b75ca72fae5a68fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">Functions</div></td></tr>
<tr class="memitem:a373d102f109ae0fa20584f243ead4035"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_module.html#a373d102f109ae0fa20584f243ead4035">GetFunctionCount</a> () const =0</td></tr>
<tr class="memdesc:a373d102f109ae0fa20584f243ead4035"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of global functions in the module.  <br /></td></tr>
<tr class="separator:a373d102f109ae0fa20584f243ead4035"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9c632d0b8c82900e478f4ccc309d19cb"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classas_i_script_function.html">asIScriptFunction</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_module.html#a9c632d0b8c82900e478f4ccc309d19cb">GetFunctionByIndex</a> (<a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> index) const =0</td></tr>
<tr class="memdesc:a9c632d0b8c82900e478f4ccc309d19cb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the function by index.  <br /></td></tr>
<tr class="separator:a9c632d0b8c82900e478f4ccc309d19cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab16a29831b08294423390a8170605523"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classas_i_script_function.html">asIScriptFunction</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_module.html#ab16a29831b08294423390a8170605523">GetFunctionByDecl</a> (const char *decl) const =0</td></tr>
<tr class="memdesc:ab16a29831b08294423390a8170605523"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the function by its declaration.  <br /></td></tr>
<tr class="separator:ab16a29831b08294423390a8170605523"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af332a2474591b032bd6b6da1c951a7b2"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classas_i_script_function.html">asIScriptFunction</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_module.html#af332a2474591b032bd6b6da1c951a7b2">GetFunctionByName</a> (const char *name) const =0</td></tr>
<tr class="memdesc:af332a2474591b032bd6b6da1c951a7b2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the function by its name.  <br /></td></tr>
<tr class="separator:af332a2474591b032bd6b6da1c951a7b2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a54b6f8e09787ad20880f73bc97a8ef10"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_module.html#a54b6f8e09787ad20880f73bc97a8ef10">RemoveFunction</a> (<a class="el" href="classas_i_script_function.html">asIScriptFunction</a> *func)=0</td></tr>
<tr class="memdesc:a54b6f8e09787ad20880f73bc97a8ef10"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove a single function from the scope of the module.  <br /></td></tr>
<tr class="separator:a54b6f8e09787ad20880f73bc97a8ef10"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">Global variables</div></td></tr>
<tr class="memitem:a7b084b6693a05616097d7059e54d983b"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_module.html#a7b084b6693a05616097d7059e54d983b">ResetGlobalVars</a> (<a class="el" href="classas_i_script_context.html">asIScriptContext</a> *ctx=0)=0</td></tr>
<tr class="memdesc:a7b084b6693a05616097d7059e54d983b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reset the global variables of the module.  <br /></td></tr>
<tr class="separator:a7b084b6693a05616097d7059e54d983b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a87e29773f7e6f2980d75288faaa74d02"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_module.html#a87e29773f7e6f2980d75288faaa74d02">GetGlobalVarCount</a> () const =0</td></tr>
<tr class="memdesc:a87e29773f7e6f2980d75288faaa74d02"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of global variables in the module.  <br /></td></tr>
<tr class="separator:a87e29773f7e6f2980d75288faaa74d02"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a00cff95b43c256cc6b9062e135a473a2"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_module.html#a00cff95b43c256cc6b9062e135a473a2">GetGlobalVarIndexByName</a> (const char *name) const =0</td></tr>
<tr class="memdesc:a00cff95b43c256cc6b9062e135a473a2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the global variable index by name.  <br /></td></tr>
<tr class="separator:a00cff95b43c256cc6b9062e135a473a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac3d5dafe8ca92bf618f438dc79ef2906"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_module.html#ac3d5dafe8ca92bf618f438dc79ef2906">GetGlobalVarIndexByDecl</a> (const char *decl) const =0</td></tr>
<tr class="memdesc:ac3d5dafe8ca92bf618f438dc79ef2906"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the global variable index by declaration.  <br /></td></tr>
<tr class="separator:ac3d5dafe8ca92bf618f438dc79ef2906"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a82996ed5c7dd2a866a6fa080cc099acc"><td class="memItemLeft" align="right" valign="top">virtual const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_module.html#a82996ed5c7dd2a866a6fa080cc099acc">GetGlobalVarDeclaration</a> (<a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> index, bool includeNamespace=false) const =0</td></tr>
<tr class="memdesc:a82996ed5c7dd2a866a6fa080cc099acc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the global variable declaration.  <br /></td></tr>
<tr class="separator:a82996ed5c7dd2a866a6fa080cc099acc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a939e6caf004c6fdae78fe89bb244d962"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_module.html#a939e6caf004c6fdae78fe89bb244d962">GetGlobalVar</a> (<a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> index, const char **name, const char **nameSpace=0, int *typeId=0, bool *isConst=0) const =0</td></tr>
<tr class="memdesc:a939e6caf004c6fdae78fe89bb244d962"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the global variable properties.  <br /></td></tr>
<tr class="separator:a939e6caf004c6fdae78fe89bb244d962"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa305c506281141e0da4cb77b944d9494"><td class="memItemLeft" align="right" valign="top">virtual void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_module.html#aa305c506281141e0da4cb77b944d9494">GetAddressOfGlobalVar</a> (<a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> index)=0</td></tr>
<tr class="memdesc:aa305c506281141e0da4cb77b944d9494"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the pointer to the global variable.  <br /></td></tr>
<tr class="separator:aa305c506281141e0da4cb77b944d9494"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aac10878c3d16f18ace4db881f7a1bb11"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_module.html#aac10878c3d16f18ace4db881f7a1bb11">RemoveGlobalVar</a> (<a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> index)=0</td></tr>
<tr class="memdesc:aac10878c3d16f18ace4db881f7a1bb11"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove the global variable from the scope of the module.  <br /></td></tr>
<tr class="separator:aac10878c3d16f18ace4db881f7a1bb11"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">Type identification</div></td></tr>
<tr class="memitem:a931d0c00cba2df1b4e368e59bac1a207"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_module.html#a931d0c00cba2df1b4e368e59bac1a207">GetObjectTypeCount</a> () const =0</td></tr>
<tr class="memdesc:a931d0c00cba2df1b4e368e59bac1a207"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of object types.  <br /></td></tr>
<tr class="separator:a931d0c00cba2df1b4e368e59bac1a207"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6659eff5d1ede3e205048d467a23e325"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classas_i_type_info.html">asITypeInfo</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_module.html#a6659eff5d1ede3e205048d467a23e325">GetObjectTypeByIndex</a> (<a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> index) const =0</td></tr>
<tr class="memdesc:a6659eff5d1ede3e205048d467a23e325"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the object type interface by index.  <br /></td></tr>
<tr class="separator:a6659eff5d1ede3e205048d467a23e325"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7fbc2bd888b248d2c2ee2d953b49eefc"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_module.html#a7fbc2bd888b248d2c2ee2d953b49eefc">GetTypeIdByDecl</a> (const char *decl) const =0</td></tr>
<tr class="memdesc:a7fbc2bd888b248d2c2ee2d953b49eefc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a type id by declaration.  <br /></td></tr>
<tr class="separator:a7fbc2bd888b248d2c2ee2d953b49eefc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a530ac35b11b18e78629f907af3aabfcd"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classas_i_type_info.html">asITypeInfo</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_module.html#a530ac35b11b18e78629f907af3aabfcd">GetTypeInfoByName</a> (const char *name) const =0</td></tr>
<tr class="memdesc:a530ac35b11b18e78629f907af3aabfcd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the type interface by name.  <br /></td></tr>
<tr class="separator:a530ac35b11b18e78629f907af3aabfcd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3fd600c804c4e6f823288f5aef5d459c"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classas_i_type_info.html">asITypeInfo</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_module.html#a3fd600c804c4e6f823288f5aef5d459c">GetTypeInfoByDecl</a> (const char *decl) const =0</td></tr>
<tr class="memdesc:a3fd600c804c4e6f823288f5aef5d459c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a type by declaration.  <br /></td></tr>
<tr class="separator:a3fd600c804c4e6f823288f5aef5d459c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">Enums</div></td></tr>
<tr class="memitem:a1a241b3dfd47f7ab5bb475c757e38df9"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_module.html#a1a241b3dfd47f7ab5bb475c757e38df9">GetEnumCount</a> () const =0</td></tr>
<tr class="memdesc:a1a241b3dfd47f7ab5bb475c757e38df9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of enum types declared in the module.  <br /></td></tr>
<tr class="separator:a1a241b3dfd47f7ab5bb475c757e38df9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1496c97f264fef10fb8f898f00460767"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classas_i_type_info.html">asITypeInfo</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_module.html#a1496c97f264fef10fb8f898f00460767">GetEnumByIndex</a> (<a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> index) const =0</td></tr>
<tr class="memdesc:a1496c97f264fef10fb8f898f00460767"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the enum type.  <br /></td></tr>
<tr class="separator:a1496c97f264fef10fb8f898f00460767"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">Typedefs</div></td></tr>
<tr class="memitem:ad30b22539655df3135f29ce28b89c820"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_module.html#ad30b22539655df3135f29ce28b89c820">GetTypedefCount</a> () const =0</td></tr>
<tr class="memdesc:ad30b22539655df3135f29ce28b89c820"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of typedefs in the module.  <br /></td></tr>
<tr class="separator:ad30b22539655df3135f29ce28b89c820"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af458f34c49dd2ac33f202fcd47d372f3"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classas_i_type_info.html">asITypeInfo</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_module.html#af458f34c49dd2ac33f202fcd47d372f3">GetTypedefByIndex</a> (<a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> index) const =0</td></tr>
<tr class="memdesc:af458f34c49dd2ac33f202fcd47d372f3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the typedef.  <br /></td></tr>
<tr class="separator:af458f34c49dd2ac33f202fcd47d372f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">Dynamic binding between modules</div></td></tr>
<tr class="memitem:a12273a6a6dd9bd39ca9675bcd84b0cc7"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_module.html#a12273a6a6dd9bd39ca9675bcd84b0cc7">GetImportedFunctionCount</a> () const =0</td></tr>
<tr class="memdesc:a12273a6a6dd9bd39ca9675bcd84b0cc7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of functions declared for import.  <br /></td></tr>
<tr class="separator:a12273a6a6dd9bd39ca9675bcd84b0cc7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6de1053c8317e7134e7e59e4527339f6"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_module.html#a6de1053c8317e7134e7e59e4527339f6">GetImportedFunctionIndexByDecl</a> (const char *decl) const =0</td></tr>
<tr class="memdesc:a6de1053c8317e7134e7e59e4527339f6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the imported function index by declaration.  <br /></td></tr>
<tr class="separator:a6de1053c8317e7134e7e59e4527339f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aae9fcff24f746827eb4bb2886272f27e"><td class="memItemLeft" align="right" valign="top">virtual const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_module.html#aae9fcff24f746827eb4bb2886272f27e">GetImportedFunctionDeclaration</a> (<a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> importIndex) const =0</td></tr>
<tr class="memdesc:aae9fcff24f746827eb4bb2886272f27e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the imported function declaration.  <br /></td></tr>
<tr class="separator:aae9fcff24f746827eb4bb2886272f27e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8ea13d58ef3fd16e0ce110b57ea74a5f"><td class="memItemLeft" align="right" valign="top">virtual const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_module.html#a8ea13d58ef3fd16e0ce110b57ea74a5f">GetImportedFunctionSourceModule</a> (<a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> importIndex) const =0</td></tr>
<tr class="memdesc:a8ea13d58ef3fd16e0ce110b57ea74a5f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the declared imported function source module.  <br /></td></tr>
<tr class="separator:a8ea13d58ef3fd16e0ce110b57ea74a5f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab24a8b95ce887c3f731eb906e3b518e5"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_module.html#ab24a8b95ce887c3f731eb906e3b518e5">BindImportedFunction</a> (<a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> importIndex, <a class="el" href="classas_i_script_function.html">asIScriptFunction</a> *func)=0</td></tr>
<tr class="memdesc:ab24a8b95ce887c3f731eb906e3b518e5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Binds an imported function to the function from another module.  <br /></td></tr>
<tr class="separator:ab24a8b95ce887c3f731eb906e3b518e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4d59b4e833bf139f6b7256d6b6bd40b6"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_module.html#a4d59b4e833bf139f6b7256d6b6bd40b6">UnbindImportedFunction</a> (<a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> importIndex)=0</td></tr>
<tr class="memdesc:a4d59b4e833bf139f6b7256d6b6bd40b6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Unbinds an imported function.  <br /></td></tr>
<tr class="separator:a4d59b4e833bf139f6b7256d6b6bd40b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3f0c215576adefd922c2cc95d16b55d8"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_module.html#a3f0c215576adefd922c2cc95d16b55d8">BindAllImportedFunctions</a> ()=0</td></tr>
<tr class="memdesc:a3f0c215576adefd922c2cc95d16b55d8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Binds all imported functions in a module, by searching their equivalents in the declared source modules.  <br /></td></tr>
<tr class="separator:a3f0c215576adefd922c2cc95d16b55d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab7b4c4b94190779028776fd1057a658f"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_module.html#ab7b4c4b94190779028776fd1057a658f">UnbindAllImportedFunctions</a> ()=0</td></tr>
<tr class="memdesc:ab7b4c4b94190779028776fd1057a658f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Unbinds all imported functions.  <br /></td></tr>
<tr class="separator:ab7b4c4b94190779028776fd1057a658f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">Byte code saving and loading</div></td></tr>
<tr class="memitem:ac6cd95dd97cc6abf28ab4d82257f5aeb"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_module.html#ac6cd95dd97cc6abf28ab4d82257f5aeb">SaveByteCode</a> (<a class="el" href="classas_i_binary_stream.html">asIBinaryStream</a> *out, bool stripDebugInfo=false) const =0</td></tr>
<tr class="memdesc:ac6cd95dd97cc6abf28ab4d82257f5aeb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Save compiled byte code to a binary stream.  <br /></td></tr>
<tr class="separator:ac6cd95dd97cc6abf28ab4d82257f5aeb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8b4a222e5309c6b367f136b6d2f664ba"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_module.html#a8b4a222e5309c6b367f136b6d2f664ba">LoadByteCode</a> (<a class="el" href="classas_i_binary_stream.html">asIBinaryStream</a> *in, bool *wasDebugInfoStripped=0)=0</td></tr>
<tr class="memdesc:a8b4a222e5309c6b367f136b6d2f664ba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Load pre-compiled byte code from a binary stream.  <br /></td></tr>
<tr class="separator:a8b4a222e5309c6b367f136b6d2f664ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">User data</div></td></tr>
<tr class="memitem:a9445d16b8c4ae7992f48216c59440a0e"><td class="memItemLeft" align="right" valign="top">virtual void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_module.html#a9445d16b8c4ae7992f48216c59440a0e">SetUserData</a> (void *data, <a class="el" href="angelscript_8h.html#a76fc6994aba7ff6c685a62c273c057e3">asPWORD</a> type=0)=0</td></tr>
<tr class="memdesc:a9445d16b8c4ae7992f48216c59440a0e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Register the memory address of some user data.  <br /></td></tr>
<tr class="separator:a9445d16b8c4ae7992f48216c59440a0e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad877470b8cfeb0ae44163e7381748e70"><td class="memItemLeft" align="right" valign="top">virtual void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_module.html#ad877470b8cfeb0ae44163e7381748e70">GetUserData</a> (<a class="el" href="angelscript_8h.html#a76fc6994aba7ff6c685a62c273c057e3">asPWORD</a> type=0) const =0</td></tr>
<tr class="memdesc:ad877470b8cfeb0ae44163e7381748e70"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the address of the previously registered user data.  <br /></td></tr>
<tr class="separator:ad877470b8cfeb0ae44163e7381748e70"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A script module can be thought of a library of script functions, classes, and global variables.</p>
<p>A pointer to the module interface is obtained by calling <a class="el" href="classas_i_script_engine.html#a651dabbc259328ce32d6942621f27a27" title="Return an interface pointer to the module.">asIScriptEngine::GetModule</a>. The module can then be <a class="el" href="classas_i_script_module.html#a8acf107194c5f079d7f7507309ebe613">built</a> from a single or multiple script files, also known as script sections. Alternatively pre-built bytecode can be <a class="el" href="classas_i_script_module.html#a8b4a222e5309c6b367f136b6d2f664ba">loaded</a>, if it has been saved from a previous build.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="doc_module.html">Script modules</a> </dd></dl>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a330835919b565c76c25e9425536f50b7" name="a330835919b565c76c25e9425536f50b7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a330835919b565c76c25e9425536f50b7">&#9670;&#160;</a></span>AddScriptSection()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int asIScriptModule::AddScriptSection </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>code</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>codeLength</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>lineOffset</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">name</td><td>The name of the script section </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">code</td><td>The script code buffer </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">codeLength</td><td>The length of the script code </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">lineOffset</td><td>An offset that will be added to compiler message line numbers </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A negative value on error. </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">asINVALID_ARG</td><td>The <em>code</em> argument is null. </td></tr>
    <tr><td class="paramname">asNOT_SUPPORTED</td><td>Compiler support is disabled in the engine. </td></tr>
    <tr><td class="paramname">asOUT_OF_MEMORY</td><td>The necessary memory to hold the script code couldn't be allocated.</td></tr>
  </table>
  </dd>
</dl>
<p>This adds a script section to the module. The script section isn't processed with this call. Only when <a class="el" href="classas_i_script_module.html#a8acf107194c5f079d7f7507309ebe613">Build</a> is called will the script be parsed and compiled into executable byte code.</p>
<p>Error messages from the compiler will refer to the name of the script section and the position within it. Normally each section is the content of a source file, so it is recommended to name the script sections as the name of the source file.</p>
<p>The code added is copied by the engine, so there is no need to keep the original buffer after the call. Note that this can be changed by setting the engine property <a class="el" href="angelscript_8h.html#a53c2e8a74ade77c928316396394ebe0fabf1577418b716c92f0a85be3e2617243">asEP_COPY_SCRIPT_SECTIONS</a> with <a class="el" href="classas_i_script_engine.html#a1bce4e5f573a2ca0ff55163e28f761dd">asIScriptEngine::SetEngineProperty</a>. </p>

</div>
</div>
<a id="a3f0c215576adefd922c2cc95d16b55d8" name="a3f0c215576adefd922c2cc95d16b55d8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3f0c215576adefd922c2cc95d16b55d8">&#9670;&#160;</a></span>BindAllImportedFunctions()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int asIScriptModule::BindAllImportedFunctions </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>A negative value on error. </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">asERROR</td><td>An error occurred. </td></tr>
    <tr><td class="paramname">asCANT_BIND_ALL_FUNCTIONS</td><td>Not all functions where bound.</td></tr>
  </table>
  </dd>
</dl>
<p>This functions tries to bind all imported functions in the module by searching for matching functions in the suggested modules. If a function cannot be bound the function will give an error <a class="el" href="angelscript_8h.html#a6e2a1647f02f2c5da931bab09e860f54a412d2352693e848f46ccdd93c8d047e4">asCANT_BIND_ALL_FUNCTIONS</a>, but it will continue binding the rest of the functions. </p>

</div>
</div>
<a id="ab24a8b95ce887c3f731eb906e3b518e5" name="ab24a8b95ce887c3f731eb906e3b518e5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab24a8b95ce887c3f731eb906e3b518e5">&#9670;&#160;</a></span>BindImportedFunction()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int asIScriptModule::BindImportedFunction </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a>&#160;</td>
          <td class="paramname"><em>importIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classas_i_script_function.html">asIScriptFunction</a> *&#160;</td>
          <td class="paramname"><em>func</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">importIndex</td><td>The index of the imported function. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">func</td><td>The true function that will be bound to the imported function. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A negative value on error. </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">asNO_FUNCTION</td><td><em>importIndex</em> or <em>func</em> is incorrect. </td></tr>
    <tr><td class="paramname">asINVALID_ARG</td><td><em>importIndex</em> is invalid or <em>func</em> is null. </td></tr>
    <tr><td class="paramname">asNOT_SUPPORTED</td><td><em>func</em> is not a script function or registered function. </td></tr>
    <tr><td class="paramname">asINVALID_INTERFACE</td><td>The signature of function doesn't match the import statement.</td></tr>
  </table>
  </dd>
</dl>
<p>The imported function is only bound if the functions have the exact same signature, i.e the same return type, and parameters.</p>
<p>Delegate objects are not supported. </p>

</div>
</div>
<a id="a8acf107194c5f079d7f7507309ebe613" name="a8acf107194c5f079d7f7507309ebe613"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8acf107194c5f079d7f7507309ebe613">&#9670;&#160;</a></span>Build()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int asIScriptModule::Build </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>A negative value on error </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">asINVALID_CONFIGURATION</td><td>The engine configuration is invalid. </td></tr>
    <tr><td class="paramname">asERROR</td><td>The script failed to build. </td></tr>
    <tr><td class="paramname">asBUILD_IN_PROGRESS</td><td>Another thread is currently building. </td></tr>
    <tr><td class="paramname">asINIT_GLOBAL_VARS_FAILED</td><td>It was not possible to initialize at least one of the global variables. </td></tr>
    <tr><td class="paramname">asNOT_SUPPORTED</td><td>Compiler support is disabled in the engine. </td></tr>
    <tr><td class="paramname">asMODULE_IS_IN_USE</td><td>The code in the module is still being used and and cannot be removed.</td></tr>
  </table>
  </dd>
</dl>
<p>Builds the script based on the previously <a class="el" href="classas_i_script_module.html#a330835919b565c76c25e9425536f50b7">added sections</a>, <a class="el" href="doc_register_api.html">registered types and functions</a>. After the build is complete the script sections are removed to free memory.</p>
<p>Before starting the build the <a class="el" href="classas_i_script_module.html#a8acf107194c5f079d7f7507309ebe613">Build</a> method removes any previously compiled script content, including the dynamically added content from <a class="el" href="classas_i_script_module.html#a1258d7cfeed965f36ba312beeb49e81c">CompileFunction</a> and <a class="el" href="classas_i_script_module.html#a34850e152dcdcb58c53a2b6929cebf77">CompileGlobalVar</a>. If the script module needs to be rebuilt all of the script sections needs to be added again.</p>
<p>Compiler messages are sent to the message callback function set with <a class="el" href="classas_i_script_engine.html#a74192fe950808eb72a64e3e371f0ea02">asIScriptEngine::SetMessageCallback</a>. If there are no errors or warnings, no messages will be sent to the callback function.</p>
<p>Any global variables found in the script will be initialized by the compiler if the engine property <a class="el" href="angelscript_8h.html#a53c2e8a74ade77c928316396394ebe0facac241d97facce4eaf9e5b0ca40dfcf1">asEP_INIT_GLOBAL_VARS_AFTER_BUILD</a> is set. If you get the error <a class="el" href="angelscript_8h.html#a6e2a1647f02f2c5da931bab09e860f54a539a1fcf3f48feaaf7c0776c88123430">asINIT_GLOBAL_VARS_FAILED</a>, then it is probable that one of the global variables during the initialization is trying to access another global variable before it has been initialized.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="doc_compile_script.html">Compiling scripts</a> </dd></dl>

</div>
</div>
<a id="a1258d7cfeed965f36ba312beeb49e81c" name="a1258d7cfeed965f36ba312beeb49e81c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1258d7cfeed965f36ba312beeb49e81c">&#9670;&#160;</a></span>CompileFunction()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int asIScriptModule::CompileFunction </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>sectionName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>code</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>lineOffset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="angelscript_8h.html#a5428f0c940201e5f3bbb28304aeb81bc">asDWORD</a>&#160;</td>
          <td class="paramname"><em>compileFlags</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classas_i_script_function.html">asIScriptFunction</a> **&#160;</td>
          <td class="paramname"><em>outFunc</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">sectionName</td><td>The name of the script section </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">code</td><td>The script code buffer </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">lineOffset</td><td>An offset that will be added to compiler message line numbers </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">compileFlags</td><td>One of <a class="el" href="angelscript_8h.html#a2bf48c41455371788805269376ca5e41">asECompileFlags</a> values </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">outFunc</td><td>Optional parameter to receive the compiled function descriptor </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A negative value on error </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">asINVALID_ARG</td><td>One or more arguments have invalid values. </td></tr>
    <tr><td class="paramname">asINVALID_CONFIGURATION</td><td>The engine configuration is invalid. </td></tr>
    <tr><td class="paramname">asBUILD_IN_PROGRESS</td><td>Another build is in progress. </td></tr>
    <tr><td class="paramname">asERROR</td><td>The compilation failed. </td></tr>
    <tr><td class="paramname">asNOT_SUPPORTED</td><td>Compiler support is disabled in the engine.</td></tr>
  </table>
  </dd>
</dl>
<p>Use this to compile a single function. Any existing compiled code in the module can be used by the function.</p>
<p>The newly compiled function can be optionally added to the scope of the module where it can later be referred to by the application or used in subsequent compilations. If not added to the module the function can still be returned in the output parameter, which will allow the application to execute it and then discard it when it is no longer needed.</p>
<p>If the output function parameter is set, remember to release the function object when you're done with it. </p>

</div>
</div>
<a id="a34850e152dcdcb58c53a2b6929cebf77" name="a34850e152dcdcb58c53a2b6929cebf77"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a34850e152dcdcb58c53a2b6929cebf77">&#9670;&#160;</a></span>CompileGlobalVar()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int asIScriptModule::CompileGlobalVar </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>sectionName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>code</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>lineOffset</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">sectionName</td><td>The name of the script section </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">code</td><td>The script code buffer </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">lineOffset</td><td>An offset that will be added to compiler message line numbers </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A negative value on error </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">asINVALID_ARG</td><td>One or more arguments have invalid values. </td></tr>
    <tr><td class="paramname">asINVALID_CONFIGURATION</td><td>The engine configuration is invalid. </td></tr>
    <tr><td class="paramname">asBUILD_IN_PROGRESS</td><td>Another build is in progress. </td></tr>
    <tr><td class="paramname">asERROR</td><td>The compilation failed. </td></tr>
    <tr><td class="paramname">asNOT_SUPPORTED</td><td>Compiler support is disabled in the engine.</td></tr>
  </table>
  </dd>
</dl>
<p>Use this to add a single global variable to the scope of a module. The variable can then be referred to by the application and subsequent compilations.</p>
<p>The script code may contain an initialization expression, which will be executed by the compiler if the engine property <a class="el" href="angelscript_8h.html#a53c2e8a74ade77c928316396394ebe0facac241d97facce4eaf9e5b0ca40dfcf1">asEP_INIT_GLOBAL_VARS_AFTER_BUILD</a> is set.</p>
<p>Any existing compiled code in the module can be used in the initialization expression. </p>

</div>
</div>
<a id="a0e6a69be59f16c8b51d1e21d3905d95c" name="a0e6a69be59f16c8b51d1e21d3905d95c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0e6a69be59f16c8b51d1e21d3905d95c">&#9670;&#160;</a></span>Discard()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void asIScriptModule::Discard </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This method is used to discard the module and any compiled bytecode it has. After calling this method the module pointer is no longer valid and shouldn't be used by the application. </p>

</div>
</div>
<a id="aa305c506281141e0da4cb77b944d9494" name="aa305c506281141e0da4cb77b944d9494"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa305c506281141e0da4cb77b944d9494">&#9670;&#160;</a></span>GetAddressOfGlobalVar()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void * asIScriptModule::GetAddressOfGlobalVar </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a>&#160;</td>
          <td class="paramname"><em>index</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">index</td><td>The index of the global variable. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A pointer to the global variable, or null if not found.</dd></dl>
<p>This method should be used to retrieve the pointer of a variable that you wish to access. </p>

</div>
</div>
<a id="af9faa3ed704bbd85b75ca72fae5a68fe" name="af9faa3ed704bbd85b75ca72fae5a68fe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af9faa3ed704bbd85b75ca72fae5a68fe">&#9670;&#160;</a></span>GetDefaultNamespace()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual const char * asIScriptModule::GetDefaultNamespace </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>The current default namespace </dd></dl>

</div>
</div>
<a id="aa356d6cd8fa3a23842ecb624926711e3" name="aa356d6cd8fa3a23842ecb624926711e3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa356d6cd8fa3a23842ecb624926711e3">&#9670;&#160;</a></span>GetEngine()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classas_i_script_engine.html">asIScriptEngine</a> * asIScriptModule::GetEngine </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>A pointer to the engine. </dd></dl>

</div>
</div>
<a id="a1496c97f264fef10fb8f898f00460767" name="a1496c97f264fef10fb8f898f00460767"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1496c97f264fef10fb8f898f00460767">&#9670;&#160;</a></span>GetEnumByIndex()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classas_i_type_info.html">asITypeInfo</a> * asIScriptModule::GetEnumByIndex </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a>&#160;</td>
          <td class="paramname"><em>index</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">index</td><td>The index of the enum type. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The type info of the enum type, or null on error. </dd></dl>

</div>
</div>
<a id="a1a241b3dfd47f7ab5bb475c757e38df9" name="a1a241b3dfd47f7ab5bb475c757e38df9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1a241b3dfd47f7ab5bb475c757e38df9">&#9670;&#160;</a></span>GetEnumCount()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> asIScriptModule::GetEnumCount </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>The number of enum types in the module. </dd></dl>

</div>
</div>
<a id="ab16a29831b08294423390a8170605523" name="ab16a29831b08294423390a8170605523"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab16a29831b08294423390a8170605523">&#9670;&#160;</a></span>GetFunctionByDecl()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classas_i_script_function.html">asIScriptFunction</a> * asIScriptModule::GetFunctionByDecl </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>decl</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">decl</td><td>The function declaration. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The function or null in case of error. </dd></dl>

</div>
</div>
<a id="a9c632d0b8c82900e478f4ccc309d19cb" name="a9c632d0b8c82900e478f4ccc309d19cb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9c632d0b8c82900e478f4ccc309d19cb">&#9670;&#160;</a></span>GetFunctionByIndex()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classas_i_script_function.html">asIScriptFunction</a> * asIScriptModule::GetFunctionByIndex </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a>&#160;</td>
          <td class="paramname"><em>index</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">index</td><td>The index of the function </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The function or null in case of error. </dd></dl>

</div>
</div>
<a id="af332a2474591b032bd6b6da1c951a7b2" name="af332a2474591b032bd6b6da1c951a7b2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af332a2474591b032bd6b6da1c951a7b2">&#9670;&#160;</a></span>GetFunctionByName()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classas_i_script_function.html">asIScriptFunction</a> * asIScriptModule::GetFunctionByName </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">name</td><td>The function name </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The function or null if not found or there are multiple matches.</dd></dl>
<p>The search for functions will be performed in the default namespace as given by <a class="el" href="classas_i_script_module.html#ab8629af79cee8212d0d244314d36f42a">SetDefaultNamespace</a> unless the name is prefixed with a scope, using the scoping operator ::. If the scope starts with :: it will be used as the absolute scope, otherwise it will be relative to the default namespace. </p>

</div>
</div>
<a id="a373d102f109ae0fa20584f243ead4035" name="a373d102f109ae0fa20584f243ead4035"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a373d102f109ae0fa20584f243ead4035">&#9670;&#160;</a></span>GetFunctionCount()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> asIScriptModule::GetFunctionCount </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>The number of global functions in this module.</dd></dl>
<p>This method retrieves the number of compiled script functions. </p>

</div>
</div>
<a id="a939e6caf004c6fdae78fe89bb244d962" name="a939e6caf004c6fdae78fe89bb244d962"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a939e6caf004c6fdae78fe89bb244d962">&#9670;&#160;</a></span>GetGlobalVar()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int asIScriptModule::GetGlobalVar </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a>&#160;</td>
          <td class="paramname"><em>index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char **&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char **&#160;</td>
          <td class="paramname"><em>nameSpace</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>typeId</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool *&#160;</td>
          <td class="paramname"><em>isConst</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">index</td><td>The index of the global variable. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">name</td><td>The name of the variable. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">nameSpace</td><td>The namespace of the variable. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">typeId</td><td>The type of the variable. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">isConst</td><td>Whether or not the variable is const. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A negative value on error. </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">asINVALID_ARG</td><td>The index is out of range. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a87e29773f7e6f2980d75288faaa74d02" name="a87e29773f7e6f2980d75288faaa74d02"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a87e29773f7e6f2980d75288faaa74d02">&#9670;&#160;</a></span>GetGlobalVarCount()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> asIScriptModule::GetGlobalVarCount </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>The number of global variables in the module. </dd></dl>

</div>
</div>
<a id="a82996ed5c7dd2a866a6fa080cc099acc" name="a82996ed5c7dd2a866a6fa080cc099acc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a82996ed5c7dd2a866a6fa080cc099acc">&#9670;&#160;</a></span>GetGlobalVarDeclaration()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual const char * asIScriptModule::GetGlobalVarDeclaration </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a>&#160;</td>
          <td class="paramname"><em>index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>includeNamespace</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">index</td><td>The index of the global variable. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">includeNamespace</td><td>Set to true if the namespace should be included in the declaration. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A null terminated string with the variable declaration, or null if not found.</dd></dl>
<p>This method can be used to retrieve the variable declaration of the script variables that the host application will access. Verifying the declaration is important because, even though the script may compile correctly the user may not have used the variable types as intended. </p>

</div>
</div>
<a id="ac3d5dafe8ca92bf618f438dc79ef2906" name="ac3d5dafe8ca92bf618f438dc79ef2906"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac3d5dafe8ca92bf618f438dc79ef2906">&#9670;&#160;</a></span>GetGlobalVarIndexByDecl()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int asIScriptModule::GetGlobalVarIndexByDecl </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>decl</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">decl</td><td>The global variable declaration. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A negative value on error, or the global variable index. </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">asERROR</td><td>The module was not built successfully. </td></tr>
    <tr><td class="paramname">asNO_GLOBAL_VAR</td><td>No matching global variable was found. </td></tr>
    <tr><td class="paramname">asINVALID_DECLARATION</td><td>The given declaration is invalid.</td></tr>
  </table>
  </dd>
</dl>
<p>This method should be used to retrieve the index of the script variable that you wish to access.</p>
<p>The method will find the script variable with the exact same declaration.</p>
<p>If the variable is declared in a namespace first call <a class="el" href="classas_i_script_module.html#ab8629af79cee8212d0d244314d36f42a">SetDefaultNamespace</a> to set the namespace that should be searched first for the variable. </p>

</div>
</div>
<a id="a00cff95b43c256cc6b9062e135a473a2" name="a00cff95b43c256cc6b9062e135a473a2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a00cff95b43c256cc6b9062e135a473a2">&#9670;&#160;</a></span>GetGlobalVarIndexByName()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int asIScriptModule::GetGlobalVarIndexByName </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">name</td><td>The name of the global variable. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A negative value on error, or the global variable index. </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">asINVALID_ARG</td><td>The name and scope for search cannot be determined </td></tr>
    <tr><td class="paramname">asNO_GLOBAL_VAR</td><td>The matching global variable was found.</td></tr>
  </table>
  </dd>
</dl>
<p>This method should be used to retrieve the index of the script variable that you wish to access.</p>
<p>The search for global variables will be performed in the default namespace as given by <a class="el" href="classas_i_script_module.html#ab8629af79cee8212d0d244314d36f42a">SetDefaultNamespace</a> unless the name is prefixed with a scope, using the scoping operator ::. If the scope starts with :: it will be used as the absolute scope, otherwise it will be relative to the default namespace. </p>

</div>
</div>
<a id="a12273a6a6dd9bd39ca9675bcd84b0cc7" name="a12273a6a6dd9bd39ca9675bcd84b0cc7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a12273a6a6dd9bd39ca9675bcd84b0cc7">&#9670;&#160;</a></span>GetImportedFunctionCount()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> asIScriptModule::GetImportedFunctionCount </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>The number of imported functions.</dd></dl>
<p>This function returns the number of functions that are imported in a module. These functions need to be bound before they can be used, or a script exception will be thrown. </p>

</div>
</div>
<a id="aae9fcff24f746827eb4bb2886272f27e" name="aae9fcff24f746827eb4bb2886272f27e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aae9fcff24f746827eb4bb2886272f27e">&#9670;&#160;</a></span>GetImportedFunctionDeclaration()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual const char * asIScriptModule::GetImportedFunctionDeclaration </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a>&#160;</td>
          <td class="paramname"><em>importIndex</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">importIndex</td><td>The index of the imported function. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A null terminated string with the function declaration, or null if not found.</dd></dl>
<p>Use this function to get the declaration of the imported function. The returned declaration can be used to find a matching function in another module that can be bound to the imported function. <br  />
 </p>

</div>
</div>
<a id="a6de1053c8317e7134e7e59e4527339f6" name="a6de1053c8317e7134e7e59e4527339f6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6de1053c8317e7134e7e59e4527339f6">&#9670;&#160;</a></span>GetImportedFunctionIndexByDecl()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int asIScriptModule::GetImportedFunctionIndexByDecl </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>decl</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">decl</td><td>The function declaration of the imported function. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A negative value on error, or the index of the imported function. </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">asERROR</td><td>The module was not built successfully. </td></tr>
    <tr><td class="paramname">asMULTIPLE_FUNCTIONS</td><td>Found multiple matching functions. </td></tr>
    <tr><td class="paramname">asNO_FUNCTION</td><td>Didn't find any matching function.</td></tr>
  </table>
  </dd>
</dl>
<p>This function is used to find a specific imported function by its declaration. </p>

</div>
</div>
<a id="a8ea13d58ef3fd16e0ce110b57ea74a5f" name="a8ea13d58ef3fd16e0ce110b57ea74a5f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8ea13d58ef3fd16e0ce110b57ea74a5f">&#9670;&#160;</a></span>GetImportedFunctionSourceModule()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual const char * asIScriptModule::GetImportedFunctionSourceModule </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a>&#160;</td>
          <td class="paramname"><em>importIndex</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">importIndex</td><td>The index of the imported function. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A null terminated string with the name of the source module, or null if not found.</dd></dl>
<p>Use this function to get the name of the suggested module to import the function from. </p>

</div>
</div>
<a id="a9e1bae86cb54be53f90dbd352c6d04ed" name="a9e1bae86cb54be53f90dbd352c6d04ed"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9e1bae86cb54be53f90dbd352c6d04ed">&#9670;&#160;</a></span>GetName()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual const char * asIScriptModule::GetName </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>The name of the module. </dd></dl>

</div>
</div>
<a id="a6659eff5d1ede3e205048d467a23e325" name="a6659eff5d1ede3e205048d467a23e325"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6659eff5d1ede3e205048d467a23e325">&#9670;&#160;</a></span>GetObjectTypeByIndex()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classas_i_type_info.html">asITypeInfo</a> * asIScriptModule::GetObjectTypeByIndex </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a>&#160;</td>
          <td class="paramname"><em>index</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">index</td><td>The index of the type. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The object type interface for the type, or null if not found.</dd></dl>
<p>This does not increase the reference count of the returned object. </p>

</div>
</div>
<a id="a931d0c00cba2df1b4e368e59bac1a207" name="a931d0c00cba2df1b4e368e59bac1a207"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a931d0c00cba2df1b4e368e59bac1a207">&#9670;&#160;</a></span>GetObjectTypeCount()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> asIScriptModule::GetObjectTypeCount </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>The number of object types declared in the module. </dd></dl>

</div>
</div>
<a id="af458f34c49dd2ac33f202fcd47d372f3" name="af458f34c49dd2ac33f202fcd47d372f3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af458f34c49dd2ac33f202fcd47d372f3">&#9670;&#160;</a></span>GetTypedefByIndex()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classas_i_type_info.html">asITypeInfo</a> * asIScriptModule::GetTypedefByIndex </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a>&#160;</td>
          <td class="paramname"><em>index</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">index</td><td>The index of the typedef. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The type info of the typedef, or null on error. </dd></dl>

</div>
</div>
<a id="ad30b22539655df3135f29ce28b89c820" name="ad30b22539655df3135f29ce28b89c820"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad30b22539655df3135f29ce28b89c820">&#9670;&#160;</a></span>GetTypedefCount()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> asIScriptModule::GetTypedefCount </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>The number of typedefs in the module. </dd></dl>

</div>
</div>
<a id="a7fbc2bd888b248d2c2ee2d953b49eefc" name="a7fbc2bd888b248d2c2ee2d953b49eefc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7fbc2bd888b248d2c2ee2d953b49eefc">&#9670;&#160;</a></span>GetTypeIdByDecl()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int asIScriptModule::GetTypeIdByDecl </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>decl</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">decl</td><td>The declaration of the type. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A negative value on error, or the type id of the type. </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">asINVALID_TYPE</td><td><em>decl</em> is not a valid type.</td></tr>
  </table>
  </dd>
</dl>
<p>Translates a type declaration into a type id. The returned type id is valid for as long as the type is valid, so you can safely store it for later use to avoid potential overhead from calling this function each time. Just remember to update the type id, any time the type is changed within the engine, e.g. when recompiling script declared classes, or changing the engine configuration.</p>
<p>The type id is based on a sequence number and depends on the order in which the type ids are queried, thus is not guaranteed to always be the same for each execution of the application. The <a class="el" href="angelscript_8h.html#ae8c3a67a97321be53181e9ed396ad83a">asETypeIdFlags</a> can be used to obtain some information about the type directly from the id.</p>
<p>A base type yields the same type id whether the declaration is const or not, however if the const is for the subtype then the type id is different, e.g. string@ isn't the same as const string@ but string is the same as const string. <br  />
 </p>

</div>
</div>
<a id="a3fd600c804c4e6f823288f5aef5d459c" name="a3fd600c804c4e6f823288f5aef5d459c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3fd600c804c4e6f823288f5aef5d459c">&#9670;&#160;</a></span>GetTypeInfoByDecl()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classas_i_type_info.html">asITypeInfo</a> * asIScriptModule::GetTypeInfoByDecl </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>decl</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">decl</td><td>The declaration of the type. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The type or null on error.</dd></dl>
<p>Translates a type declaration into the type info. The returned type is valid for as long as the type is valid, so you can safely store it for later use to avoid potential overhead from calling this function each time. Just remember to update the type info pointer any time the type is changed within the engine, e.g. when recompiling script declared classes, or changing the engine configuration. </p>

</div>
</div>
<a id="a530ac35b11b18e78629f907af3aabfcd" name="a530ac35b11b18e78629f907af3aabfcd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a530ac35b11b18e78629f907af3aabfcd">&#9670;&#160;</a></span>GetTypeInfoByName()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classas_i_type_info.html">asITypeInfo</a> * asIScriptModule::GetTypeInfoByName </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">name</td><td>The name of the type. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The type interface for the type, or null if not found.</dd></dl>
<p>The search for types will be performed in the default namespace as given by <a class="el" href="classas_i_script_module.html#ab8629af79cee8212d0d244314d36f42a">SetDefaultNamespace</a> unless the name is prefixed with a scope, using the scoping operator ::. If the scope starts with :: it will be used as the absolute scope, otherwise it will be relative to the default namespace. </p>

</div>
</div>
<a id="ad877470b8cfeb0ae44163e7381748e70" name="ad877470b8cfeb0ae44163e7381748e70"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad877470b8cfeb0ae44163e7381748e70">&#9670;&#160;</a></span>GetUserData()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void * asIScriptModule::GetUserData </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="angelscript_8h.html#a76fc6994aba7ff6c685a62c273c057e3">asPWORD</a>&#160;</td>
          <td class="paramname"><em>type</em> = <code>0</code></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>An identifier specifying the user data to set. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The pointer to the user data. </dd></dl>

</div>
</div>
<a id="a8b4a222e5309c6b367f136b6d2f664ba" name="a8b4a222e5309c6b367f136b6d2f664ba"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8b4a222e5309c6b367f136b6d2f664ba">&#9670;&#160;</a></span>LoadByteCode()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int asIScriptModule::LoadByteCode </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classas_i_binary_stream.html">asIBinaryStream</a> *&#160;</td>
          <td class="paramname"><em>in</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool *&#160;</td>
          <td class="paramname"><em>wasDebugInfoStripped</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">in</td><td>The input stream. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">wasDebugInfoStripped</td><td>Set to true if the byte code was saved without debug information. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A negative value on error. </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">asINVALID_ARG</td><td>The stream object wasn't specified. </td></tr>
    <tr><td class="paramname">asBUILD_IN_PROGRESS</td><td>Another thread is currently building. </td></tr>
    <tr><td class="paramname">asOUT_OF_MEMORY</td><td>The engine ran out of memory while loading the byte code. </td></tr>
    <tr><td class="paramname">asMODULE_IS_IN_USE</td><td>The code in the module is still being used and and cannot be removed. </td></tr>
    <tr><td class="paramname">asERROR</td><td>It was not possible to load the byte code.</td></tr>
  </table>
  </dd>
</dl>
<p>This method is used to load pre-compiled byte code from disk or memory. The application must implement an object that inherits from <a class="el" href="classas_i_binary_stream.html">asIBinaryStream</a> to provide the necessary stream operations.</p>
<p>It is expected that the application performs the necessary validations to make sure the pre-compiled byte code is from a trusted source. The application should also make sure the pre-compiled byte code is compatible with the current engine configuration, i.e. that the engine has been configured in the same way as when the byte code was first compiled.</p>
<p>If the method returns asERROR it is either because the byte code is incorrect, e.g. corrupted due to disk failure, or it has been compiled with a different engine configuration. If possible the engine provides information about the type of error that caused the failure while loading the byte code to the <a class="el" href="classas_i_script_engine.html#a74192fe950808eb72a64e3e371f0ea02">message stream</a>.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="doc_adv_precompile.html">Pre-compiled byte code</a> </dd></dl>

</div>
</div>
<a id="a54b6f8e09787ad20880f73bc97a8ef10" name="a54b6f8e09787ad20880f73bc97a8ef10"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a54b6f8e09787ad20880f73bc97a8ef10">&#9670;&#160;</a></span>RemoveFunction()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int asIScriptModule::RemoveFunction </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classas_i_script_function.html">asIScriptFunction</a> *&#160;</td>
          <td class="paramname"><em>func</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">func</td><td>The pointer to the function that should be removed. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A negative value on error. </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">asNO_FUNCTION</td><td>The function is not part of the scope.</td></tr>
  </table>
  </dd>
</dl>
<p>This method allows the application to remove a single function from the scope of the module. The function is not destroyed immediately though, only when no more references point to it. </p>

</div>
</div>
<a id="aac10878c3d16f18ace4db881f7a1bb11" name="aac10878c3d16f18ace4db881f7a1bb11"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aac10878c3d16f18ace4db881f7a1bb11">&#9670;&#160;</a></span>RemoveGlobalVar()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int asIScriptModule::RemoveGlobalVar </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a>&#160;</td>
          <td class="paramname"><em>index</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">index</td><td>The index of the global variable. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A negative value on error. </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">asINVALID_ARG</td><td>The index is out of range.</td></tr>
  </table>
  </dd>
</dl>
<p>The global variable is removed from the scope of the module, but it is not destroyed until all functions that access it are freed. </p>

</div>
</div>
<a id="a7b084b6693a05616097d7059e54d983b" name="a7b084b6693a05616097d7059e54d983b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7b084b6693a05616097d7059e54d983b">&#9670;&#160;</a></span>ResetGlobalVars()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int asIScriptModule::ResetGlobalVars </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classas_i_script_context.html">asIScriptContext</a> *&#160;</td>
          <td class="paramname"><em>ctx</em> = <code>0</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">ctx</td><td>Optional script context. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A negative value on error. </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">asERROR</td><td>The module was not compiled successfully. </td></tr>
    <tr><td class="paramname">asINIT_GLOBAL_VARS_FAILED</td><td>The initialization of the global variables failed.</td></tr>
  </table>
  </dd>
</dl>
<p>Resets the global variables declared in this module to their initial value. The context should be informed if the application needs to have extra control over how the initialization is done, for example for debugging, or for catching exceptions. </p>

</div>
</div>
<a id="ac6cd95dd97cc6abf28ab4d82257f5aeb" name="ac6cd95dd97cc6abf28ab4d82257f5aeb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac6cd95dd97cc6abf28ab4d82257f5aeb">&#9670;&#160;</a></span>SaveByteCode()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int asIScriptModule::SaveByteCode </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classas_i_binary_stream.html">asIBinaryStream</a> *&#160;</td>
          <td class="paramname"><em>out</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>stripDebugInfo</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">out</td><td>The output stream. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">stripDebugInfo</td><td>Set to true to skip saving the debug information. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A negative value on error. </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">asINVALID_ARG</td><td>The stream object wasn't specified. </td></tr>
    <tr><td class="paramname">asNOT_SUPPORTED</td><td>Compiler support is disabled in the engine. </td></tr>
    <tr><td class="paramname">asERROR</td><td>Nothing has been compiled in the module.</td></tr>
  </table>
  </dd>
</dl>
<p>This method is used to save pre-compiled byte code to disk or memory, for a later restoral. The application must implement an object that inherits from <a class="el" href="classas_i_binary_stream.html">asIBinaryStream</a> to provide the necessary stream operations.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="doc_adv_precompile.html">Pre-compiled byte code</a> </dd></dl>

</div>
</div>
<a id="a76733de5a86875c4a0f021f7f92a6d12" name="a76733de5a86875c4a0f021f7f92a6d12"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a76733de5a86875c4a0f021f7f92a6d12">&#9670;&#160;</a></span>SetAccessMask()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="angelscript_8h.html#a5428f0c940201e5f3bbb28304aeb81bc">asDWORD</a> asIScriptModule::SetAccessMask </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="angelscript_8h.html#a5428f0c940201e5f3bbb28304aeb81bc">asDWORD</a>&#160;</td>
          <td class="paramname"><em>accessMask</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">accessMask</td><td>The access bit mask </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The previous access mask.</dd></dl>
<p>The module's access mask with be bitwise and-ed with the registered entity's access mask in order to determine if the module is allowed to access the entity. If the result is 0 then the script in the module will not be able to use the entity.</p>
<p>This can be used to provide different interfaces to scripts that serve different purposes in the application.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="doc_adv_access_mask.html">Access masks and exposing different interfaces</a> </dd></dl>

</div>
</div>
<a id="ab8629af79cee8212d0d244314d36f42a" name="ab8629af79cee8212d0d244314d36f42a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab8629af79cee8212d0d244314d36f42a">&#9670;&#160;</a></span>SetDefaultNamespace()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int asIScriptModule::SetDefaultNamespace </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>nameSpace</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">nameSpace</td><td>The namespace that should be used. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A negative value on error. </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">asINVALID_ARG</td><td>The namespace is null. </td></tr>
    <tr><td class="paramname">asINVALID_DECLARATION</td><td>The namespace is invalid.</td></tr>
  </table>
  </dd>
</dl>
<p>Set the default namespace that should be used in the following calls for searching for declared entities, or when compiling new individual entities. </p>

</div>
</div>
<a id="a1a7534bace9eefdc3175a1999f9cbf4a" name="a1a7534bace9eefdc3175a1999f9cbf4a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1a7534bace9eefdc3175a1999f9cbf4a">&#9670;&#160;</a></span>SetName()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void asIScriptModule::SetName </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">name</td><td>The new name.</td></tr>
  </table>
  </dd>
</dl>
<p>Sets the name of the script module. </p>

</div>
</div>
<a id="a9445d16b8c4ae7992f48216c59440a0e" name="a9445d16b8c4ae7992f48216c59440a0e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9445d16b8c4ae7992f48216c59440a0e">&#9670;&#160;</a></span>SetUserData()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void * asIScriptModule::SetUserData </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="angelscript_8h.html#a76fc6994aba7ff6c685a62c273c057e3">asPWORD</a>&#160;</td>
          <td class="paramname"><em>type</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">data</td><td>A pointer to the user data. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>An identifier specifying the user data to set. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The previous pointer stored in the module</dd></dl>
<p>This method allows the application to associate a value, e.g. a pointer, with the module instance.</p>
<p>The type values 1000 through 1999 are reserved for use by the official add-ons.</p>
<p>Optionally, a callback function can be <a class="el" href="classas_i_script_engine.html#a7523853b9a9bf7dab603fa6a06393d51">registered</a> to clean up the user data when the module is destroyed. </p>

</div>
</div>
<a id="ab7b4c4b94190779028776fd1057a658f" name="ab7b4c4b94190779028776fd1057a658f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab7b4c4b94190779028776fd1057a658f">&#9670;&#160;</a></span>UnbindAllImportedFunctions()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int asIScriptModule::UnbindAllImportedFunctions </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>A negative value on error.</dd></dl>
<p>Unbinds all imported functions in the module. </p>

</div>
</div>
<a id="a4d59b4e833bf139f6b7256d6b6bd40b6" name="a4d59b4e833bf139f6b7256d6b6bd40b6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4d59b4e833bf139f6b7256d6b6bd40b6">&#9670;&#160;</a></span>UnbindImportedFunction()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int asIScriptModule::UnbindImportedFunction </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a>&#160;</td>
          <td class="paramname"><em>importIndex</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">importIndex</td><td>The index of the imported function. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A negative value on error. </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">asINVALID_ARG</td><td>The index is not valid.</td></tr>
  </table>
  </dd>
</dl>
<p>Unbinds the imported function. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="angelscript_8h.html">angelscript.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="classas_i_script_module.html">asIScriptModule</a></li>
    <li class="footer">Generated on Sun May 21 2023 10:12:40 for AngelScript by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
  </ul>
</div>
</body>
</html>
